{% extends 'admin-v2/layout.html.twig' %}

{% set menu = 'admin_v2_operation_wechat_notification_record' %}

{% block main %}
  <div class="well" style="text-align:left;">
    {{ 'wechat.notification.tooltip_hint'|trans }}
  </div>
  <table class="table table-striped table-hover" id="notification-table" style="word-break:break-all;">
    <thead>
    <tr>
      <th width="10%">{{ 'admin.wechat_notification.template_name'|trans }}</th>
      <th width="30%">{{ 'wechat.notification.wechat_record_content'|trans }}</th>
      <th width="30%">{{ 'wechat.notification.sms_record_content'|trans }}</th>
      <th width="15%">{{ 'wechat.notification.record_send_time'|trans }}</th>
      <th width="15%">{{ 'wechat.notification.record_send_status'|trans }}</th>
    </tr>
    </thead>
    <tbody>
    {% for notification in notifications %}
      {% set event = notificationEvents[notification.eventId]|default([]) %}
      {% set smsEvent = smsNotificationEvents[notification.smsEventId]|default([]) %}
      {% include 'admin-v2/operating/wechat-notification/subscribe-record-tr.html.twig' with {event: event, smsEvent: smsEvent} %}
    {% else %}
      <tr>
        <td colspan="20">
          <div class="empty">{{'wechat.notification.record.empty'|trans}}</div>
        </td>
      </tr>
    {% endfor %}
    </tbody>
  </table>
  {{ admin_macro.paginator(paginator) }}
{% endblock %}
